package com.blast.comicsisland.model.commic.commiccatalog;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by dell on 2015/6/24.
 */
public class BookPart {
    private String partsize;
    //字段名 part_id
    private String partId;
    private String partnumber;
    private String name;
    private String totalpage;

    public String getPartsize() {
        return partsize;
    }

    public void setPartsize(String partsize) {
        this.partsize = partsize;
    }

    public String getPartId() {
        return partId;
    }

    public void setPartId(String partId) {
        this.partId = partId;
    }

    public String getPartnumber() {
        return partnumber;
    }

    public void setPartnumber(String partnumber) {
        this.partnumber = partnumber;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getTotalpage() {
        return totalpage;
    }

    public void setTotalpage(String totalpage) {
        this.totalpage = totalpage;
    }

    //--------------------------->
    //解析
    /*
        "bookPartList": [ {
            "partsize": 0.85,
             "part_id": 269667,
             "partnumber": 9,
             "name": "第9集",
             "totalpage": 16
            },
         */
    public void jsonParse(JSONObject jsonObject){
        if (jsonObject != null) {
            try {
                partId = jsonObject.getString("part_id");
                name = jsonObject.getString("name");
                partnumber = jsonObject.getString("partnumber");
                totalpage = jsonObject.getString("totalpage");
            } catch (JSONException e) {
                e.printStackTrace();
            }


        }

    }
}
